package com.example.gzysmartcity.ui.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.gzysmartcity.R;
import com.example.gzysmartcity.repository.model.MyCarBuy;

import org.jetbrains.annotations.NotNull;

public class CarBuyRvAdapter extends BaseQuickAdapter<MyCarBuy, BaseViewHolder> {
    public CarBuyRvAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, MyCarBuy dataBean) {
        baseViewHolder.setText(R.id.tv_rv_carbuy_index,(baseViewHolder.getAdapterPosition()+1)+"");
        baseViewHolder.setText(R.id.tv_rv_carbuy_line_name, dataBean.getLineName());
        baseViewHolder.setText(R.id.tv_rv_carbuy_name,dataBean.getCarTypeName());
        baseViewHolder.setText(R.id.tv_rv_carbuy_shouyi,dataBean.getPrice()+"");
        baseViewHolder.setText(R.id.tv_rv_carbuy_zhandi,dataBean.getSize()+"");

    }
}
